package com.yaoxuguang.concurrence.wait_notify.producer_consumer.ontToOne;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.wait_notify.producer_consumer.ontToOne
 * @Description: 消费者的线程
 * @date 2018年12月21日18:09
 */
public class ThreadC extends Thread {
    private Consumer consumer;

    public ThreadC(Consumer consumer) {
        this.consumer = consumer;
    }

    @Override
    public void run() {
        while (true) {
            consumer.getValue();
        }
    }
}
